var operations;

$('#operationListPage').live('pageshow', function(event) {
	var accountId = getUrlVars()["accountId"];
	$.getJSON(serviceURL + 'operations?accountId='+accountId, displayOperations);
});

function displayOperations(data) {
	// alert(data);
	$('#operationList li').remove();
	operations = data;
	$.each(operations, function(index, operation) {
		$('#operationList').append('<li><p>'+operation.date+' <strong>'+operation.label+'</strong><br/>'+operation.value+' &euro;</p></li>');
	});
	$('#operationList').listview('refresh');
}
